package com.yoho.vpm.flash

import android.content.Intent
import com.yoho.vpm.HomeActivity
import com.yoho.vpm.R
import com.yoho.vpm.R.id.skip_button
import com.yoho.vpm.base.BaseActivity
import com.yoho.vpm.custom.SkipButtonView
import kotlinx.android.synthetic.main.activity_flash.*

class FlashActivity : BaseActivity() {

    override val viewId: Int  = R.layout.activity_flash

    override fun init() {
        skip_button.setOnMyClickListener(object : SkipButtonView.OnMyClickListener {
            override fun onClick() = startHomeActivity()
        })

        skip_button.setOnProgressListener(object : SkipButtonView.OnProgressListener {
            override fun onSuccess() = startHomeActivity()
        })
    }
    private fun startHomeActivity() {
        startActivity(Intent(this@FlashActivity, HomeActivity::class.java))
        finish()
    }
}
